import request from '@/utils/request'

// 获取面经数据
export const getArticleApi = params => {
  return request({
    url: '/admin/interview/query',
    method: 'GET',
    params: params
  })
}

// 添加面经
export const createArticleApi = data => {
  return request({
    url: '/admin/interview/create',
    method: 'POST',
    data: data
  })
}
// 删除文章
export const deleteArticleApi = data => {
  return request({
    url: '/admin/interview/remove',
    method: 'DELETE',
    data: data
  })
}
// 获取单个面经
export const getSingleArticleApi = id => {
  return request({
    url: '/admin/interview/show',
    method: 'GET',
    params: { id: id }
  })
}

// 更新数据

export const updateSingleArticleApi = data => {
  return request({
    url: '/admin/interview/update',
    method: 'PUT',
    data: data
  })
}
